package controller

import (
	"context"
	"xr-game-server/core/httpserver"
	"xr-game-server/dto/itemlogdto"
	"xr-game-server/gamecfg"
	"xr-game-server/module/itemlog"
)

type ItemLogController struct {
}

func initItemLog() {
	httpserver.RegCMSCustomizeRes(ItemUrl, &ItemLogController{})
}

func (this *ItemLogController) GetItemLog(context context.Context, req *itemlogdto.GetItemLogReq) (res *httpserver.CMSQueryResp, er error) {
	return itemlog.Page(context, req)
}

func (this *ItemLogController) GetItemSource(context context.Context, req *itemlogdto.GetItemSourceReq) (res []*gamecfg.ItemSourceCfg, er error) {
	return gamecfg.GetItemSources(), nil
}
